home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / biz / swood / fw_mef_e.lha / FW_MEf-e / ISeveral.fw < prev    next >
Text File  |  1997-04-27  |  4KB  |  190 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. R='0A'X
  4. Dre=0
  5. Sei=0
  6. Address='FinalW'
  7. Options results
  8. STATUS PORTNAME
  9. FW=result
  10. address=FW
  11. SIGNAL ON BREAK_C
  12. SIGNAL ON SYNTAX
  13. 'ShowMessage 2 1 "Insert Several V1.5e - 97/04/27" "© Heiko Schroeder" "E-Mail: age@thepentagon.com" "(-:" "Ok" "(-:"'
  14. GetDocItemPrefs Decimal
  15. Punkt=Result
  16. If Punkt="Comma" then DocItemPrefs Decimal Period
  17. GraphicTool
  18. nr=1
  19. CurrentObject
  20. ObjectId=Result
  21. IF ObjectId=0 THEN;do
  22. 'ShowMessage 1 1 "Macro: Insert Several" "A B O R T" "No graphical object selected..." "Okay" "" ""'
  23. Call BREAK_C
  24. End
  25. Objekt.0=nr;Objekt.nr=ObjectID
  26. FirstObject Selected
  27. ID=result
  28. Call Zaehlen
  29. Do While 1
  30. NextObject ID Selected
  31. ID=result
  32. If ID=0 then Leave
  33. Call Zaehlen
  34. End
  35. If Objekt.0=1 then;do
  36. gruppe=false
  37. end
  38. else gruppe=true
  39. Do a=2 to Objekt.0
  40. SelectObject Objekt.a MULTIPLE
  41. End
  42. SelectObject Objekt.1 MULTIPLE
  43. STATUS View
  44. Zoom=result
  45. STATUS Pages
  46. Seiten=result
  47. STATUS Page
  48. Seite=result
  49. If Gruppe=true then Group
  50. Copy
  51. IF RC=0 THEN;do
  52. CurrentObject
  53. ObjectID=result
  54. GetObjectCoords ObjectID
  55. Parse var result Seite x y w h
  56. wl=w
  57. hl=h
  58. GetObjectRotation ObjectID
  59. Dreh=result
  60. GetObjectType ObjectID
  61. Typ=result
  62. If Typ=2|Typ=3 then;do
  63. If Seite~=1 then;do
  64. 'ShowMessage 1 1 "FW has problems with lines outside" "the page 1... CANCEL" "" "Okay" "" ""'
  65. Call BREAK_C
  66. End
  67. End
  68. If Gruppe=true then Ungroup
  69. 'ShowMessage 1 0 "Screen output?" "" "" "normal" "speed" ""'
  70. ba=result
  71. IF ba=2 THEN;DO
  72. status WINDOW
  73. parse VAR result links oben width height minwidth minheight maxwidth maxheight
  74. sizewindow minwidth minheight
  75. End
  76. Do While 1
  77. Result="ß"
  78. RequestText '"Insert Several" "Number of copies" ""'
  79. Anzahl=Result
  80. If Anzahl="ß" then call Ende1
  81. If Anzahl=""|Anzahl=0 then call Ende
  82. If Datatype(Anzahl,'W')=1 then leave
  83. else call oops
  84. End
  85. Do while 1
  86. Result="ß"
  87. RequestText '"Insert Several" "Horizontal displacement:" ""'
  88. Hor=Result
  89. If Hor="ß" then call Ende1
  90. If Hor="" then Hor=0
  91. If Datatype(Hor,'N')=1 then leave
  92. else call oops1
  93. End
  94. Do while 1
  95. Result="ß"
  96. RequestText '"Insert Several" "Vertical displacement:" ""'
  97. Ver=Result
  98. If Ver="ß" then call Ende1
  99. If Ver="" then Ver=0
  100. If Datatype(Ver,'N')=1 then leave
  101. else call oops1
  102. End
  103. If Typ~=2&Typ~=3 then;do
  104. Do while 1
  105. Result="ß"
  106. RequestText '"Insert Several" "Rotation:" ""'
  107. Dre=Result
  108. If Dre="ß" then call Ende1
  109. If Dre="" then Dre=0
  110. If Datatype(Dre,'W')=1 then leave
  111. else call oops
  112. End
  113. Do While 1
  114. Result="ß"
  115. RequestText '"Insert Several" "On which page? 0=selected page" ""'
  116. Sei=Result
  117. If Sei="ß" then call Ende1
  118. If Sei=""|Sei=0 then Sei=Seite
  119. If Datatype(Sei,'W')=1 then leave
  120. else call oops
  121. End
  122. end
  123. s=Sei-Seiten
  124. Do a=1 to s
  125. InsertPageBreak
  126. End
  127. If ba=2 then View 20
  128. Do i=1 TO Anzahl
  129. Paste
  130. CurrentObject
  131. ObjectID=Result
  132. a=x+(Hor*i)
  133. b=y+(Ver*i)
  134. Winkel=Dreh+Dre*i
  135. If Typ=2|Typ=3 then;do
  136. w=wl+(Hor*i)
  137. h=hl+(Ver*i)
  138. Sei=Seite
  139. End
  140. SetObjectCoords ObjectID Sei a b w h
  141. SetObjectRotation ObjectID Winkel
  142. If Gruppe=true then Ungroup
  143. End
  144. End
  145. Redraw
  146. Call WH
  147. 'ShowMessage 2 1 "Thanks for using." "" "" "@-`-" "Please" ":-))"'
  148. Exit
  149. ENDE:
  150. Call WH
  151. 'ShowMessage 1 1 "Incorrect number of copies..." "A B O R T" "" "Okay" "" ""'
  152. EXIT
  153. ENDE1:
  154. Call WH
  155. 'ShowMessage 1 1 "You have cancelled..." "© Heiko Schröder" "http://yi.com/home/SchroederHeiko" "Okay" "" ""'
  156. EXIT
  157. SYNTAX:
  158. Call WH
  159. 'ShowMessage 1 1 "There was an error." "Error-identification you can find in »Ram:Error«" "" "Okay" "" ""'
  160. address "REXX"
  161. Open("F","Ram:Error","W")
  162. write ("F","ATTENTION! FW_MEf V1.5e-Error")
  163. write ("F",'Error in line' SIGL ':' ERRORTEXT(RC))
  164. write ("F",'Please report the author. » s93324@fh-telekom-leipzig.de «'||R||R)
  165. Close ("F")
  166. EXIT
  167. BREAK_C:
  168. Call WH
  169. 'ShowMessage 1 1 "Macro-Break..." "" "" "I know..." "" ""'
  170. EXIT
  171. WH:
  172. If ba=2 then;do
  173. GoToPage Sei
  174. View Zoom
  175. sizewindow width height
  176. End
  177. If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  178. Return
  179. Zaehlen:
  180. If ID~=Objekt.1 then;do
  181. nr=nr+1
  182. Objekt.0=nr;Objekt.nr=ID
  183. End
  184. Return
  185. oops:
  186. 'ShowMessage 1 1 "Input error!" "" "" "Okay" "" ""'
  187. return
  188. oops1:
  189. 'ShowMessage 1 1 "Input error!" "Please use (.) !" "" "Okay" "" ""'
  190. return